﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;
using System.Windows;

namespace Unscrambler.Helpers
{
    public abstract class TileHelperBase
    {
        public TranslateTransform GetTranslateTransformFromUIElement(UIElement itemManipulated)
        {
            TransformGroup myTransform = itemManipulated.RenderTransform as TransformGroup;
            TranslateTransform translateTransform = (TranslateTransform)myTransform.Children.First(x => x is TranslateTransform);
            return translateTransform;
        }

        public RotateTransform GetRotateTransformFromUIElement(UIElement itemManipulated)
        {
            TransformGroup myTransform = itemManipulated.RenderTransform as TransformGroup;
            RotateTransform rotateTransform = (RotateTransform)myTransform.Children.First(x => x is RotateTransform);
            return rotateTransform;
        }
    }
}
